3.5.53 \(\int \cos ^3(c+d x) (a+b \sec (c+d x)) \, dx\) [453]

Optimal. Leaf size=54 \[ \frac {b x}{2}+\frac {a \sin (c+d x)}{d}+\frac {b \cos (c+d x) \sin (c+d x)}{2 d}-\frac {a \sin ^3(c+d x)}{3 d} \]

[Out]

1/2*b*x+a*sin(d*x+c)/d+1/2*b*cos(d*x+c)*sin(d*x+c)/d-1/3*a*sin(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3872, 2713, 2715, 8} \begin {gather*} -\frac {a \sin ^3(c+d x)}{3 d}+\frac {a \sin (c+d x)}{d}+\frac {b \sin (c+d x) \cos (c+d x)}{2 d}+\frac {b x}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a + b*Sec[c + d*x]),x]

[Out]

(b*x)/2 + (a*Sin[c + d*x])/d + (b*Cos[c + d*x]*Sin[c + d*x])/(2*d) - (a*Sin[c + d*x]^3)/(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rubi steps

\begin {align*} \int \cos ^3(c+d x) (a+b \sec (c+d x)) \, dx &=a \int \cos ^3(c+d x) \, dx+b \int \cos ^2(c+d x) \, dx\\ &=\frac {b \cos (c+d x) \sin (c+d x)}{2 d}+\frac {1}{2} b \int 1 \, dx-\frac {a \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac {b x}{2}+\frac {a \sin (c+d x)}{d}+\frac {b \cos (c+d x) \sin (c+d x)}{2 d}-\frac {a \sin ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.08, size = 57, normalized size = 1.06 \begin {gather*} \frac {b (c+d x)}{2 d}+\frac {a \sin (c+d x)}{d}-\frac {a \sin ^3(c+d x)}{3 d}+\frac {b \sin (2 (c+d x))}{4 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a + b*Sec[c + d*x]),x]

[Out]

(b*(c + d*x))/(2*d) + (a*Sin[c + d*x])/d - (a*Sin[c + d*x]^3)/(3*d) + (b*Sin[2*(c + d*x)])/(4*d)

________________________________________________________________________________________

Maple [A]
time = 0.08, size = 49, normalized size = 0.91

method result size
risch \(\frac {b x}{2}+\frac {3 a \sin \left (d x +c \right )}{4 d}+\frac {a \sin \left (3 d x +3 c \right )}{12 d}+\frac {b \sin \left (2 d x +2 c \right )}{4 d}\) \(48\)
derivativedivides \(\frac {\frac {a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) \(49\)
default \(\frac {\frac {a \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+b \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) \(49\)
norman \(\frac {\frac {\left (2 a -b \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (2 a +b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {b x}{2}+\frac {4 a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {3 b x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {3 b x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {b x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}\) \(124\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a+b*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d*(1/3*a*(2+cos(d*x+c)^2)*sin(d*x+c)+b*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 46, normalized size = 0.85 \begin {gather*} -\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} b}{12 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sec(d*x+c)),x, algorithm="maxima")

[Out]

-1/12*(4*(sin(d*x + c)^3 - 3*sin(d*x + c))*a - 3*(2*d*x + 2*c + sin(2*d*x + 2*c))*b)/d

________________________________________________________________________________________

Fricas [A]
time = 4.43, size = 42, normalized size = 0.78 \begin {gather*} \frac {3 \, b d x + {\left (2 \, a \cos \left (d x + c\right )^{2} + 3 \, b \cos \left (d x + c\right ) + 4 \, a\right )} \sin \left (d x + c\right )}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sec(d*x+c)),x, algorithm="fricas")

[Out]

1/6*(3*b*d*x + (2*a*cos(d*x + c)^2 + 3*b*cos(d*x + c) + 4*a)*sin(d*x + c))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a+b*sec(d*x+c)),x)

[Out]

Integral((a + b*sec(c + d*x))*cos(c + d*x)**3, x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 98 vs. \(2 (48) = 96\).
time = 0.44, size = 98, normalized size = 1.81 \begin {gather*} \frac {3 \, {\left (d x + c\right )} b + \frac {2 \, {\left (6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*sec(d*x+c)),x, algorithm="giac")

[Out]

1/6*(3*(d*x + c)*b + 2*(6*a*tan(1/2*d*x + 1/2*c)^5 - 3*b*tan(1/2*d*x + 1/2*c)^5 + 4*a*tan(1/2*d*x + 1/2*c)^3 +
 6*a*tan(1/2*d*x + 1/2*c) + 3*b*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 + 1)^3)/d

________________________________________________________________________________________

Mupad [B]
time = 0.83, size = 55, normalized size = 1.02 \begin {gather*} \frac {b\,x}{2}+\frac {2\,a\,\sin \left (c+d\,x\right )}{3\,d}+\frac {b\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{2\,d}+\frac {a\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^3*(a + b/cos(c + d*x)),x)

[Out]

(b*x)/2 + (2*a*sin(c + d*x))/(3*d) + (b*cos(c + d*x)*sin(c + d*x))/(2*d) + (a*cos(c + d*x)^2*sin(c + d*x))/(3*
d)

________________________________________________________________________________________